projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e56adae
)
Allow context menus on scale sliders
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 3 Feb 2012 06:41:07 +0000
(
01:41
-0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Tue, 14 Feb 2012 21:36:53 +0000
(16:36 -0500)
This will be used for a popup in the color chooser.
gtk/gtkrange.c
patch
|
blob
|
history
diff --git
a/gtk/gtkrange.c
b/gtk/gtkrange.c
index ddd669cb74024952d8759dc3285cd547dcfdee16..14c72f9d2a46664cb5b60f46a96384209464f389 100644
(file)
--- a/
gtk/gtkrange.c
+++ b/
gtk/gtkrange.c
@@
-2548,6
+2548,16
@@
gtk_range_button_press (GtkWidget *widget,
if (gtk_range_update_mouse_location (range))
gtk_widget_queue_draw (widget);
+ if (priv->mouse_location == MOUSE_SLIDER &&
+ gdk_event_triggers_context_menu ((GdkEvent *)event))
+ {
+ gboolean handled;
+
+ g_signal_emit_by_name (widget, "popup-menu", &handled);
+
+ return TRUE;
+ }
+
if (priv->mouse_location == MOUSE_TROUGH &&
event->button == GDK_BUTTON_PRIMARY)
{